import base
import uuid
import datetime
from web import models


# models.UserInfo.objects.create(username='why002', password='why19970321', mobile_phone='13954643114', email='123@163.com')

def run():
    users = models.UserInfo.objects.all()
    policy_object = models.PricePolicy.objects.filter(category=1, title='个人免费版').first()
    for user in users:
        models.Transaction.objects.create(
            status=2,
            order=str(uuid.uuid4()),
            user=user,
            price_policy=policy_object,
            count=0,
            price=0,
            start_datetime=datetime.datetime.now(),
        )


if __name__ == '__main__':
    run()
